'\" t
.TH cm2_admin 1 "15 September 2006" "Code Manager II"

.SH NAME
cm2 admin \- Perform administration actions on file or project
.SH SYNOPSIS
.TS
l l.
cm2 admin [-a] remove file	Removed specified file
cm2 admin      rename old new	Rename specified file
cm2 admin      rmdir dir	Remove directory contents
cm2 admin      copy old new	Copy a file
cm2 admin      compact	Compact code repository
.TE

.SH DESCRIPTION
The \fIcm2 admin(1)\fP utility is used to performance several different
actions on the repository, and where necessary update the transaction lof
of changes kept for each project. 

Each action works on a single file or directory at a time. Each action will
be described separately below.

.SH THE 'REMOVE' ACTION
This is used to remove a file from the working code directory. The difference
between simply using the \fIrm(1)\fP command and this one is that it updates the
transaction log for the project which is useful when attempting to track
when changes have occured.

By default the file in question will just be removed from the working
directory. However by including the \fB-a\fP argument the file will also be
removed from the code control area - \fBso use with caution!\fP. 

Please note that the \fB-a\fP option will be aborted if the file in question
has been tagged at all. In this case the list of tags that it is part of 
will be shown.

.SH THE 'RENAME' ACTION
The takes the specified file and creates a new file of the specified name.
If is different than the \fImv(1)\fP UNIX command since it will update the
transaction log with appropriate details - it will also copy the underlying
code repository information so the file has a complete revision history
like the original [although without any tags of course].

.SH THE 'RMDIR' ACTION
This function takes a specified directory and after checking all files
in it are checked in will remove the files and then the directory.
It only works if no sub-directories are present. Again it will update
the project transaction log to record the changes, which is why it
is preferable to simply typing 'rm -rf dir'.

.SH THE 'COPY' ACTION
If you wish just to create a new file without any revision information
based on an existing file then simply use the UNIX \fIcp(1)\fP command. 
However if you wish to keep the revision history of the file being copied
then use the \fBCOPY\fP action.

Once completed a new file will exist of the name specified and it will
also have a complete revision history of the original - though since it
is essentially a 'new' file - no tag information will exist for it.

.SH THE 'COMPACT' ACTION
This is only applicable to projects that use the newer PV2 
repository format. When used all files in the project will be checked 
and if possible compressed in size. The amount of space saved is typically
small unless many changes have been made to the project.

The amount of space saved at the file system level will be strongly 
determined by the file system block size - a block size of 1kb will 
offer the greatest saving.

.SH EXIT CODES
The \fIcm2 admin(1)\fP utility follows UNIX standard practise:

.TP 4
.B 0
The specified action has been completed successfully.
.TP
.B >0
A an error occurred and the action did not complete successfully.

.SH NOTES
Never delete or update files under the code repository directly - always
use the \fIcm2 admin(1)\fP equivalent instead.

.SH AUTHOR
The \fBCode Manager II\fP tool set was written by Simon Edwards, Proprius Consulting Ltd, (\fBwww.proprius.co.uk\fP).

.SH SEE ALSO
.BR cm2(1),
.BR cm2_info(1),
.BR cm2_mci(1),
.BR cm2_mco(1),
.BR cm2_status(1).

.SH AVAILABILITY
This utility was specifically written under the GNU GPL license and as required
by such software comes with \fIno warranty or guarantee of any kind\fP.

